package io.jpress.module.smLock.service.provider;

import io.jboot.aop.annotation.Bean;
import io.jboot.db.model.Columns;
import io.jpress.module.smLock.service.LockUserService;
import io.jpress.module.smLock.model.LockUser;
import io.jboot.service.JbootServiceBase;

import javax.inject.Singleton;

@Bean
@Singleton
public class LockUserServiceProvider extends JbootServiceBase<LockUser> implements LockUserService {


    @Override
    public LockUser findByPhone(String phone) {
        return DAO.findFirstByColumns(Columns.create("phone", phone));
    }
}